#ifndef LEXER_H
#define LEXER_H

#include "token.h"
#include <string>
#include <vector>
#include <unordered_map>

class Lexer {
private:
    std::string source;
    size_t position;
    int line;
    int column;
    
    std::unordered_map<std::string, TokenType> keywords;
    
    void initializeKeywords();
    char currentChar();
    char peekChar();
    void advance();
    void skipWhitespace();
    void skipComment();
    Token scanNumber();
    Token scanString();
    Token scanChar();
    Token scanIdentifier();
    Token scanOperator();
    
public:
    Lexer(const std::string& source);
    std::vector<Token> tokenize();
    Token nextToken();
};

#endif
